﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Text;

namespace CSCSN.ViewModels.RoleAndUser
{
    public class LoginVM
    {
        [Required(ErrorMessage = "邮箱账号不能为空是必须的。")]
        [EmailAddress]
        public string UserName { get; set; }

        [Required(ErrorMessage = "密码是必须的。")]
        [RegularExpression(@"((^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[$@$!%*#?&])[A-Za-z\d$@$!%*#?&]{8,})$)", ErrorMessage = "密码至少8个字符，至少1个小写字母，一个大写字母，1个数字和1个特殊字符！")]
        public string Password { get; set; }
        public string ReturnUrl { get; set; }    // 登录成功后返回的路径，缺省返回到入口首页
        public bool RememberMe { get; set; }     // 记住我
        public string Name { get; set; }

        public string Verify { get; set; } //验证码
        public LoginVM() { }
    }
}
